package com.jg;

import com.jg.config.SpringConfig;
import com.jg.dao.OrderDao;
import com.jg.service.OrderService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);

        OrderDao orderDao = ctx.getBean("orderDaoImpl",OrderDao.class);
        orderDao.show();

        System.out.println("------------------------");

        OrderService orderService = ctx.getBean(OrderService.class);
        orderService.show();
    }
}
